<?php
include_once('common/init.php');
$app = isset($_GET['app'])?$_GET['app']:'index';
$act = isset($_GET['act'])?$_GET['act']:'index';
$app = $app.'Action';

$appPath = APP_PATH.$app.'.class.php';
if(file_exists($appPath)){
    include_once($appPath);
    if(class_exists($app)){
        $dc = new $app($p);
        if(method_exists($dc, $act)){
            $dc->$act();
        }
        else{
            $dc->index();
            //$dc->makeError('EROOR::method not exists!');
        }
    }
    else{
        $dc = new action();
        $dc->make_error('EROOR::class not exists!');
    }
}
else{
    $dc = new base();
    $dc->make_error('EROOR::404!');
}
?>